﻿<%@ Page Language="C#" %>
<%--包括门面和住宅，停车费与客户在一览操作--%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>门面房间数据初始化</title>
    <link href="../../../../WebPlugin/jquery-easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../../../WebPlugin/jquery-easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../../../../WebPlugin/jquery-easyui/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="../../../../WebPlugin/jquery-easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../../../WebPlugin/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>

    <script src="../../../../WebPlugin/jquery-easyui/JQueryCommon.js" type="text/javascript"></script>
    <script src="../../PageJS/BaseInfo/SysInitManager.js" type="text/javascript"></script>
</head>
<body class="easyui-layout">
    <div region="west" split="true" id="layout_west" style="width:350px;" closable="false" title="查询房间/门面"> 
    <div id="tabIndex" class="easyui-tabs" fit="true">
		<div title="房间" style="padding:0px;" fit="true">
		  <div class="easyui-layout" fit="true" border="false">
            <div  region="north" border="false">
	        <table style="padding:10px;">
		       <tr>
			        <td>选择区域:</td>
			        <td><input id="cbarea" class="easyui-combobox" style="width:200px" valueField="Code" textField="Name" required="true" ></input></td>
		        </tr>
		        <tr>
			        <td>选择房间:</td>
			        <td><input id="cbbuild" class="easyui-combobox" style="width:200px" valueField="Code" textField="Name" required="true"></input></td>
		        </tr>
		        <tr>
			        <td>房间号/业主:</td>
			        <td><input id="txtroom" class="easyui-validatebox" style="width:200px" type="text" ></input></td>
		        </tr>
		        <tr>
			        <td colspan="2" align="center"><a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="btn_roomsearch();">查找</a></td>
		        </tr>
	        </table>
	        </div>
	         <div region="center" border="false" title="房间列表">
	                <div id="roomtool2">
   	                    <a id="linkbindroom" href="#" class="easyui-linkbutton" plain="true" iconCls="icon-reload" onclick="dlg_bingingitem_roomshow();">批量绑定收费项目</a>
   	                    <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-reload" onclick="dlg_bindingmeter_show();">批量绑定用表</a>
                    </div>
	              <table id="roomlistGird"  class="easyui-datagrid" toolbar="#roomtool2" fit="true" border="false" iconCls="icon-edit" singleSelect="true" pagination="true">
		             <thead>
			            <tr>
				            <th field="RoomNumber" width="100">房间号</th>
				            <th field="AreaName" width="120">区域</th>
				            <th field="BuildingName" width="80">楼栋</th>
				            <th field="Name" width="100">业主</th>
				            <th field="UseType" width="100">住宅/商用</th>
			            </tr>
		            </thead>
	               </table>
	        </div>
	    </div>
		</div>
		<div title="门面" >
			<div class="easyui-layout" fit="true" border="false">
            <div  region="north" border="false">
	        <table style="padding:10px;">
		        <tr>
			        <td>门面名称:</td>
			        <td><input id="txtshop" class="easyui-validatebox" style="width:200px" type="text"></input></td>
		        </tr>
		        <tr>
			        <td colspan="2" align="center"><a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="btn_shopsearch();">查找</a></td>
		        </tr>
	        </table>
	        </div>
	         <div region="center" border="false" title="门面列表">
	              <div id="shoptool2">
	                 <a id="linkbindshop" href="#" class="easyui-linkbutton" plain="true" iconCls="icon-reload" onclick="dlg_bingingitem_shopshow();">批量绑定收费项目</a>
   	                 <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-reload" onclick="dlg_bindingmeter_show();">批量绑定用表</a>
   	              </div>
	              <table id="shoplistGrid"  class="easyui-datagrid" toolbar="#shoptool2" fit="true" border="false" iconCls="icon-edit" singleSelect="true" pagination="true">
		             <thead>
			            <tr>
				            <th field="ShopName" width="100">门面名称</th>
				            <th field="OwnerName" width="120">名称</th>
				            <th field="Memo" width="80">备注</th>
			            </tr>
		            </thead>
	               </table>
	        </div>
	    </div>
		</div>
	</div>
           
    </div>
    <div region="center"  title="初始化数据">
    <div class="easyui-tabs" fit="true">
		<div title="收费项目">
		<div id="tool2">
   	        <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-save" onclick="dlg_bingingitem_save();">保存</a>
   	        <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-add" onclick="dlg_bingingitem_addshow();">添加</a>
   	        <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-cancel" onclick="dlg_bingingitem_del();">删除</a>
   	        
        </div>
	    <table id="itemlistGrid"  class="easyui-datagrid" toolbar="#tool2" fit="true" singleSelect="true" pagination="true">
           <thead>
            <tr>
	            <th field="ItemCode" width="80">项目编码</th>
	            <th field="ItemName" width="200">项目名称</th>
	            <th field="Lastmaturity" width="100" editor="datebox">到期日</th>
	            <%--<th field="Thismaturity" width="100" editor="datebox">本次到期日</th>--%>
	            <th field="Lastsurplus" width="100" editor="{type:'numberbox',options:{precision:2}}">上次余额</th>
	            <th field="LastLateFee" width="120" editor="{type:'numberbox',options:{precision:2}}">上次滞纳金</th>
            </tr>
        </thead>
       </table>
		</div>
		<div title="用表" >
		<div id="tool3">
   	        <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-search" onclick="$('#dlg-metersearch').dialog('open');">查询用表</a>
   	        <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-save" onclick="btn_metersave();">保存</a>
   	        <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-add" onclick="btn_meteradd();">添加</a>
   	        <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-cancel" onclick="btn_meterdelete();">删除</a>
        </div>
	    <table id="meterlistGrid"  class="easyui-datagrid" toolbar="#tool3" fit="true" singleSelect="true" pagination="true">
           <thead>
            <tr>
	            <th field="MeterType2" width="80">分类</th>
	            <th field="MeterType" width="100">类型</th>
	            <th field="OwnerName" width="120">姓名</th>
	            <th field="ItemCode" width="150">关联项目</th>
	            <th field="InitialDate" width="100">初始化日期</th>
	            <th field="InitMeterNum" width="120" editor="{type:'numberbox',options:{precision:1}}">初始化读数</th>
	            <th field="DeleteFlag" width="80">删除</th>
            </tr>
        </thead>
       </table>
		</div>
    </div>
   	    
    </div>
</body>

<%--弹出窗--%>
<%--收费项目绑定--%>
<div id="dlg-bindingitem" class="easyui-dialog" title="" style="width:600px;height:400px;padding:1px"
 buttons="#dlg-buttons" resizable="true" modal="true">
	<div id="tool4">
        <table cellpadding="0" cellspacing="0" style="width:100%">
			<tr>
				<td style="text-align:right;padding-right:2px">
					<input id="ckdelitem" type="checkbox"/>是否删除原有绑定收费项目
				</td>
			</tr>
		</table>
    </div>
    <table id="serviceitemGird" class="easyui-datagrid" toolbar="#tool4" url="../Controller.aspx?controller=ServiceItemController&method=GetServiceItemData&_statCode=&_type=0,1"  fit="true" border="false" iconCls="icon-edit">
       <thead>
        <tr>
            <th field="ck" checkbox="true"></th>
	        <th field="Code" width="80">代码</th>
	        <th field="ItemName" width="200" >项目名称</th>
	        <th field="StatCode" width="80">统计分类</th>
	        <th field="Price" width="100" >价格</th>
        </tr>
       </thead>
    </table>
   <input id="bindtype" type="hidden" value="0" />
   <input id="ownerId" type="hidden" value="0" />
   <input id="binditemId" type="hidden" value="0" />
</div>
<div id="dlg-buttons">
	<a href="#" class="easyui-linkbutton" onclick="dlg_bindingitem_confirm();">确定</a>
	<a href="#" class="easyui-linkbutton" onclick="$('#dlg-bindingitem').dialog('close');">取消</a>
</div>

<%--用表绑定--%>
<div id="dlg-bingingmeter" class="easyui-dialog" title="用表绑定给业主" style="width:400px;height:250px;padding:5px"
 buttons="#dlg-buttons2" resizable="true" modal="true">
<table style="padding:10px;">
   <tr>
        <td>请选择分类:</td>
        <td>
        <input id="cbformType2" class="easyui-combobox"  style="width:200px;" required="true" valueField="code" textField="name" value="0" ></input></td>
    </tr>
    <tr>
        <td>请选择类型:</td>
        <td>
        <input id="cbformType" class="easyui-combobox" style="width:200px;"  required="true" valueField="code" textField="name"  value="0"></input></td>
    </tr>
    <tr>
        <td>绑定用表数量:</td>
        <td>
        <input id="txtmeternum" class="easyui-numberbox" style="width:200px;"  required="true"  value="1"></input></td>
    </tr>
    <tr>
        <td>绑定收费项目:</td>
        <td>
        <input id="cbmeteritemcode" class="easyui-combobox" style="width:200px;"  required="true" valueField="Code" textField="ItemName" url="../Controller.aspx?controller=SysInitController&method=GetCbServiceItemData"></input></td>
    </tr>
</table>  
<input id="metertype" type="hidden" value="0" />
<input id="meterownerId" type="hidden" value="" />
<input id="meterownerName" type="hidden" value="" />
<input id="metersrccId" type="hidden" value="" />
<input id="metersrccName" type="hidden" value="" />
</div>
<div id="dlg-buttons2">
	<a href="#" class="easyui-linkbutton" onclick="dlg_bingingmeter_confirm();">确定</a>
	<a href="#" class="easyui-linkbutton" onclick="$('#dlg-bingingmeter').dialog('close');">取消</a>
</div>

<%--用表查询--%>        

<div id="dlg-metersearch" class="easyui-dialog" title="查询用表" style="width:400px;height:250px;padding:5px"
 buttons="#dlg-buttons3" resizable="true" modal="true">
<table style="padding:10px;">
   <tr>
        <td>请选择分类:</td>
        <td>
        <input id="cbsformType2" class="easyui-combobox"  style="width:200px;" required="true" valueField="code" textField="name" value="0" ></input></td>
    </tr>
    <tr>
        <td>请选择类型:</td>
        <td>
        <input id="cbsformType" class="easyui-combobox" style="width:200px;"  required="true" valueField="code" textField="name"  value="0"></input></td>
    </tr>
</table>  
</div>
<div id="dlg-buttons3">
	<a href="#" class="easyui-linkbutton" onclick="dlg_searchmeter_confirm();">确定</a>
	<a href="#" class="easyui-linkbutton" onclick="$('#dlg-metersearch').dialog('close');">取消</a>
</div>
                          
</html>
